﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Agresso.Interface.Layer.SQL
{
    public class ChargeTypeAccountMappingSQL
    {
        public static string InsertChargeTypeAccountMapping()
        {
            return @"
            INSERT INTO [i_chargetype_account_mapping]
           ([charge_type]
           ,[account]
           ,[created_date]
           ,[modified_date]
        ,tcrelet_account
        ,vcrelet_account
        ,freighthire_account
        ,tcrelet_tax_account
        ,vcrelet_tax_account
        ,freighthire_tax_account
        ,tcrelet_account_name
        ,vcrelet_account_name
        ,freighthire_account_name
        ,tcrelet_tax_account_singapore
        ,vcrelet_tax_account_singapore
            )
     VALUES
           (@charge_type
           ,@account
           ,@created_date
           ,@modified_date
            ,@tcrelet_account
            ,@vcrelet_account
            ,@freighthire_account
            ,@tcrelet_tax_account
            ,@vcrelet_tax_account
            ,@freighthire_tax_account
            , @tcrelet_account_name
            , @vcrelet_account_name
            , @freighthire_account_name
            ,@tcrelet_tax_account_singapore
            ,@vcrelet_tax_account_singapore
            )";
        }
        public static string UpdateChargeTypeAccountMapping()
        {
            return @"
           UPDATE [i_chargetype_account_mapping] SET
           [charge_type] = @charge_type
           ,[account] = @account
           ,[modified_date] = @modified_date
        ,tcrelet_account = @tcrelet_account
        ,vcrelet_account = @vcrelet_account
        ,freighthire_account = @freighthire_account
        ,tcrelet_tax_account = @tcrelet_tax_account
        ,vcrelet_tax_account = @vcrelet_tax_account
        ,freighthire_tax_account = @freighthire_tax_account
,tcrelet_account_name= @tcrelet_account_name
,vcrelet_account_name= @vcrelet_account_name
,freighthire_account_name= @freighthire_account_name
,tcrelet_tax_account_singapore=@tcrelet_tax_account_singapore
,vcrelet_tax_account_singapore=@vcrelet_tax_account_singapore
,cargorelet_account_name_IN=@cargorelet_account_name_IN
,cargorelet_account_IN=@cargorelet_account_IN
,cargorelet_account_GST_IN=@cargorelet_account_GST_IN
,cargorelet_account_OUT_Ovs=@cargorelet_account_OUT_Ovs
,cargorelet_account_name_OUT_Ovs=@cargorelet_account_name_OUT_Ovs
,cargorelet_account_GST_OUT_Ovs=@cargorelet_account_GST_OUT_Ovs
,cargorelet_account_OUT_SG=@cargorelet_account_OUT_SG
,cargorelet_account_name_OUT_SG=@cargorelet_account_name_OUT_SG
,cargorelet_account_GST_OUT_SG=@cargorelet_account_GST_OUT_SG
             WHERE cta_id = @cta_id";
        }
        public static string GetChargeTypeAccountMappingByName()
        {
            return @"select * from i_chargetype_account_mapping where charge_type=@charge_type ";
        }
        public static string GetAllChargeTypeAccountMapping()
        {
            return @"select * from i_chargetype_account_mapping order by charge_type";
        }
        public static string GetAllSoftmarChargeTypeAccount()
        {
            return @"select distinct type charge_type from OpCharge order by 1";
        }
    }
}
